/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 有点呆
 * Date: 2024-03-16
 * Time: 11:11
 */
import java.util.Scanner;

public class Method {
    //斐波那契第N项
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        System.out.println(fib(a));
    }
    public static int fib(int a){
        if (a == 1 || a == 2){
            return 1;
        }
        return fib(a-1)+fib(a-2);
    }

    //求1234的每项和
    public static void main6(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        System.out.println(count(a));
    }
    public static int count(int n){
        if (n < 10) {
            return n;
        }
        return n%10+count(n/10);
    }

    //1234--1 2 3 4
    public static void main5(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        printInt(a);
    }

    public static void printInt(int a) {
        if (a > 9) {
            printInt(a/10);
        }
        System.out.print(a%10 + ' ');
    }

    //递归求1-10的和
    public static void main4(String[] args) {
        System.out.println(sum(10));
        }
    public static int sum(int n){
        if(n == 1){
            return 1;
        }else{
            return n+sum(n-1);
        }
    }

    //递归求N的阶乘
    public static void main3(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        System.out.println(fac(n));
    }
    public static int fac(int n){
        if(n == 1){
            return 1;
        }else{
            return n*fac(n- 1);
        }
    }

    //判断最大数
    public static void main2(String[] args) {
        System.out.println(maxInt(1,2));
        System.out.println(maxDouble(1.3,5.5));
    }
    public static int maxInt(int a, int b){
        if(a > b){
            return a;
        }else{
            return b;
        }
    }
    public static double maxDouble(double a, double b){
        if(a > b){
            return a;
        }else{
            return b;
        }
    }

    //整数，小数的求和
    public static void main1(String[] args) {
        int a = 10;
        int b = 20;
        System.out.println(addInt(a,b));
        double c = 2.3;
        double d = 5.4;
        System.out.println(addDouble(c,d));
    }
    public static int addInt(int a, int b) {
        return a + b;
    }

    public static double addDouble(double a, double b){
        return a+b;
    }
}
